<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    var url = '';
    var querystring = {m:'xx', h:'hh'};
    console.log(querystring);

    if (querystring) {
        for (param in querystring) {
            if (param && querystring[param]) {
                url += 'param=' + querystring[param] + '&';
            }
        }
    }
    console.log(url);


//for – in 是用来循环带有字符串key的对象的方法。

    var obj = {a:1, b:2, c:3};
    for (var prop in obj) {
        console.log("obj." + prop + " = " + obj[prop]);
    }

//    JavaScript6里引入了一种新的循环方法，它就是for-of循环，它既比传统的for循环简洁，同时弥补了forEach和for-in循环的短板。

    let iterable = [10, 20, 30];
    for (let value of iterable) {
        console.log(value);
    }



</script>

</body>
</html>